package com.ruoyi.common;

import com.ruoyi.common.utils.AgeUtils;
import com.ruoyi.common.utils.DateUtils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class TestAge {
    public static void main(String[] args) {
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
        Date date = new Date();
        System.out.println(date);
        String dateTimeToDate = DateUtils.DateTimeToDate(date);
        System.out.println(dateTimeToDate);
        String ageFromBirthTime = AgeUtils.getAgeFromBirthTime(dateTimeToDate);
        System.out.println(ageFromBirthTime);
    }
}
